/*-
 * DataBody.java
 *
 * Date: 2017年1月5日
 * Time: 上午10:37:16
 *
 * 版权所有©2012-2013 rengh
 */

package com.lmx.kathHack.serialize;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.katharsis.request.dto.DataBody;
import io.katharsis.request.dto.ResourceRelationships;

/**
 * #{description}
 * 
 * @author lmx
 * custom kath DataBody
 */

public class DataBodyExt extends DataBody{
    private String id;
    private String type;

    @JsonDeserialize(using = ResourceRelationshipsDeserializerExt.class)
    private ResourceRelationships relationships;

    private JsonNode attributes;
    //自定义段，把子表内容加载到此段
    @JsonDeserialize(using = ResourcePayloadDatasDeserializer.class)
    private PayloadDatas postPayload;

    @Override
	public String getId() {
        return id;
    }

    @Override
	public void setId(String id) {
        this.id = id;
    }

    @Override
	public String getType() {
        return type;
    }

    @Override
	public void setType(String type) {
        this.type = type;
    }

    @Override
	public ResourceRelationships getRelationships() {
        return relationships;
    }

    @Override
	public void setRelationships(ResourceRelationships relationships) {
        this.relationships = relationships;
    }

    @Override
	public JsonNode getAttributes() {
        return attributes;
    }

    @Override
	public void setAttributes(JsonNode attributes) {
        this.attributes = attributes;
    }
    
    public PayloadDatas getPostPayload() {
        return postPayload;
    }

    public void setPostPayload(PayloadDatas postPayload) {
        this.postPayload = postPayload;
    }
}